SchedulingStrategyServiceglobal without sharing class SchedulingStrategyService
this class contains a scheduling api implementation for each type of scheduling strategy. There are inner classes for each type of Scheduling Strategy which have a method for Schedule creation. This class contains deprecated items. Methods
prepareScheduleglobal SchedulingStrategyService.ProposedScheduleDetail prepareSchedule(SchedulingStrategyService.ScheduleDetail scheduleDetail) This method calculates a Schedule and ScheduleExceptions for the provided ScheduleDetail parameters. Input Parameters
Return ValueThis service returns ProposedScheduleDetail object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code rescheduleglobal Boolean reschedule(List<SchedulingStrategyService.RescheduleWrapper> rescheduleWrapperList) A global method to reschedule the provided list of schedules with a new proposed corresponding scheduling strategy in rescheduleWrapper. Input Parameters
Exceptions Thrown
Return ValueThis service returns True if the Schedule updated then completed successfully, False otherwise. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code splitRescheduleglobal List<Assignment__c> splitReschedule(List<SchedulingStrategyService.SplitRescheduleWrapper> splitRescheduleWrapperList) A global method to split and reschedule the schedules.
Input Parameters
Exceptions Thrown
Return ValueThis service returns a list of newly created assignments. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code DeprecatedThe following items are deprecated and not supported for use. We recommend that you stop using these items to avoid exceptions. Methods
rescheduleDeprecated: Use reschedule(List global Boolean reschedule(SchedulingStrategyService.RescheduleWrapper request) This global method reschedules a Schedule with a new proposed scheduling strategy in rescheduleWrapper. Input Parameters
Return ValueThis service returns True if the Schedule updated then completed successfully, False otherwise. splitRescheduleDeprecated: Use splitReschedule(List global Assignment__c splitReschedule(SchedulingStrategyService.SplitRescheduleWrapper request) A global method to split and reschedule the Schedule. Input Parameters
Return ValueThis service returns an assignment object. SchedulingStrategyService.ScheduleDetailFieldglobal class ScheduleDetailField The structure for Metadata information related to the ScheduleDetail field. Properties
MethodsScheduleDetailFieldglobal ScheduleDetailField() SchedulingStrategyService.SplitRescheduleWrapperglobal class SplitRescheduleWrapper The structure for Split Reschedule related input values that are common for all strategy types. Properties
SchedulingStrategyService.RescheduleWrapperglobal class RescheduleWrapper The structure for Reschedule related input values that are common for all strategy types. Properties
SchedulingStrategyService.ScheduleDetailglobal abstract class ScheduleDetail The structure for Schedule related input values that are common for all strategy types. Properties
Methods
resolveImplementationglobal abstract Type resolveImplementation() An abstract method to resolve the Schedule class dynamically at runtime. getFieldglobal virtual Object getField() getFieldglobal virtual Object getField(String key) setFieldglobal virtual void setField(String key, Object value) enumerateFieldsglobal virtual Map<String, ScheduleDetailField> enumerateFields() SchedulingStrategyService.EndDateLevelScheduleDetailglobal class EndDateLevelScheduleDetail extends ScheduleDetail The structure for Schedule related input values that will be used in the "EndDateLevelSchedule" schedule Strategy. This class extends SchedulingStrategyService.ScheduleDetail Properties
Methods
resolveImplementationglobal override Type resolveImplementation() enumerateFieldsglobal override virtual Map<String, ScheduleDetailField> enumerateFields() SchedulingStrategyService.IgnoreAvailabilityScheduleDetailglobal class IgnoreAvailabilityScheduleDetail extends ScheduleDetail The structure for Schedule related input values that will be used in "EndDateIgnoreAvailability" Schedule Strategy types. This class extends SchedulingStrategyService.ScheduleDetail Properties
Methods
resolveImplementationglobal override Type resolveImplementation() enumerateFieldsglobal override virtual Map<String, ScheduleDetailField> enumerateFields() SchedulingStrategyService.AdjustHoursScheduleDetailglobal class AdjustHoursScheduleDetail extends ScheduleDetail The structure for Schedule related input values that will be used in "AdjustHours" Strategy types. This class extends SchedulingStrategyService.ScheduleDetail Properties
Methods
resolveImplementationglobal override Type resolveImplementation() enumerateFieldsglobal override virtual Map<String, ScheduleDetailField> enumerateFields() SchedulingStrategyService.PercentAllocationScheduleDetailglobal class PercentAllocationScheduleDetail extends ScheduleDetail The structure for Schedule related input values that will be used in "PercentAllocation" Strategy types. This class extends SchedulingStrategyService.ScheduleDetail Properties
Methods
resolveImplementationglobal override Type resolveImplementation() enumerateFieldsglobal override virtual Map<String, ScheduleDetailField> enumerateFields() SchedulingStrategyService.CustomScheduleDetailglobal class CustomScheduleDetail extends ScheduleDetail The structure for Schedule related input values that will be used in "Custom" Strategy types. This class extends SchedulingStrategyService.ScheduleDetail Properties
Methods
resolveImplementationglobal override Type resolveImplementation() enumerateFieldsglobal override virtual Map<String, ScheduleDetailField> enumerateFields() SchedulingStrategyService.ZeroHourScheduleDetailglobal class ZeroHourScheduleDetail extends ScheduleDetail The structure for Schedule related input values that will be used in "ZeroHour" Strategy types. This class extends SchedulingStrategyService.ScheduleDetail MethodsresolveImplementationglobal override Type resolveImplementation() SchedulingStrategyService.SchedulePatternglobal class SchedulePattern The structure for input variables for Schedule creation using "Custom" strategy types. Properties
SchedulingStrategyService.ProposedScheduleDetailglobal class ProposedScheduleDetail the structure for information returned in the output. it will contain the schedule and ScheduleExceptions (related to Schedule_Exception__c PSA object) for that Schedule. Properties
SchedulingStrategyService.PercentAllocationRowglobal class PercentAllocationRow The structure for the information (startDate, endDate, percentAllocated) related to each Percent Allocation Row. Properties
SchedulingStrategyService.ISchedulingStrategyglobal interface ISchedulingStrategy The structure for the Top level Global SchedulingStrategy interface that has the method for Schedule creation. MethodsprepareScheduleProposedScheduleDetail prepareSchedule(SchedulingStrategyService.ScheduleDetail scheduleDetail) |